<%@ page contentType="text/html;charset=UTF-8" language="java" import=" com.scalar.chiptrack.utils.ConfigManager"%>

<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/chiptrack-tags.tld" prefix="chiptrack" %>

<chiptrack:checkLogon sourcePage="/purchaseOrder.do"/>

<%String chipTracContext = "/" + ConfigManager.getChipTracContext();%>

<HTML><HEAD><TITLE>Scalarsoft - ChipTrac</TITLE>
<META http-equiv=Content-Type content="text/html; charset=windows-1252">
<LINK href="<%=chipTracContext%>/jsp/includes/stylesheets/scalarsoft.css" type="text/css" rel="stylesheet">
<META content="MSHTML 5.50.4807.2300" name=GENERATOR>
<SCRIPT LANGUAGE="JavaScript">
function searchPONumber()
{
    document.purchaseOrderLotSearchForm.action.value = "search";
	document.purchaseOrderLotSearchForm.submit();
}
</SCRIPT>
</HEAD>
<BODY bgColor="#ffffff" leftMargin=0 topMargin=0 marginheight="0" marginwidth="0">

<!-- Top Header Start-->
<%@include file="/jsp/includes/header.jsp"  %>
<!-- Top Header End-->

<table cellSpacing="0" cellPadding="0" width="100%" border="0">
	<tr>
		<td width='180' valign='top' background='<%=chipTracContext%>/jsp/includes/images/left_red_bg.gif'>
			<!-- Side Navigation start -->
			<%@include file="/jsp/finance/purchase_order_menu.jsp" %>
			<!-- end of the side navigations -->
		</td>
		<td bgcolor="#ffffff"><IMG height=9 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=8></td>
		<td bgcolor="#ffffff"><IMG height=480 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=2></td>
		<td valign="top">
			<table cellSpacing=0 cellPadding=0 width="100%" border="0">
				<tr><td class="NArialW" width='100%' align="center" valign="top">&nbsp;</td></tr>
				<tr><td class="NArialW" width='100%' align="center" valign="top">Lot Allocation Search</td></tr>
				<tr>
					<td width="100%" valign="top">
					<html:form name="purchaseOrderLotSearchForm" type="com.scalar.chiptrack.ChipTrackActionForm" action="/purchaseOrderLotSearchAction.do" method="post" scope="request">
					<table border="0" width="100%" align=right>
						<tr><td width="100%" colspan=2 >&nbsp;</td></tr>
						<tr><td width="30%">&nbsp;</td><td align="left"><chiptrack:errors styleClass="NArialL"/></td></tr>
						<tr><td width="30%">&nbsp;</td><td align="left"><chiptrack:info styleClass="NArialL"/></td></tr>
						<tr>
							<td width="100%" colspan=2 >
								<table border="0" width="100%" align="center">
									<tr>
										<td width="20%">&nbsp;</td>
										<td width="15%" align="right" class="NArialL">PO Number</td>
										<td width="1%">&nbsp;</td>
										<td width="52%" align="left" class="NArialL" align="right">
											<%
												String poNumber = (String)request.getAttribute("poNumber");
												if ( poNumber == null )
												{
													poNumber = "";
												}
											%>
											<input type="text" name="searchPONumber" value="<%=poNumber%>" class="txfield">
										</td>
									</tr>
									<tr><td colspan="4">&nbsp;</td></tr>
									<tr>
                                        <td>&nbsp;</td>
                                        <td>&nbsp;</td>
                                        <td width="1%">&nbsp;</td>
										<td >
											<a href="javascript:searchPONumber();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/search.gif" width="53" height="17" onmouseover="window.status='Click to Search';return true" onmouseout="window.status='';return true" title="Click here to Search"></a> &nbsp;&nbsp;
											<a href="javascript:document.purchaseOrderLotSearchForm.reset();"><img border="0" src="<%=chipTracContext%>/jsp/includes/images/reset.gif" width="53" height="17" onmouseover="window.status='Click to Reset';return true" onmouseout="window.status='';return true" title="Click here to Reset"></a>&nbsp;&nbsp;
                                            <font class="NArialL"><a href="<%=chipTracContext%>/purchaseOrderLotAction.do?action=Miscellaneous" onmouseover="window.status='Click to View Lots with out Purchase Order Number';return true" onmouseout="window.status='';return true">Lots with out Purchase Order Number</a></font>

										</td>
									</tr>
									<tr>
										<td colspan="4" width="100%" align="center">
											<table border="0" width="50%" align="center">
												<logic:present name="poList">
													<tr bgcolor="#993333">
														<td align="center" class="NArialL"><font color="#FFFFFF">PO Number</font></td>
														<td align="center" class="NArialL"><font color="#FFFFFF">Part Number</font></td>
														<td align="center" class="NArialL"><font color="#FFFFFF">Process Type</font></td>
													</tr>
												</logic:present>
												<logic:present name="poList">
													<logic:iterate name="poList" type="com.scalar.chiptrack.finance.purchaseorder.PurchaseOrderLot" id="lot" scope="request" indexId="iterateIdx">
													<% if( Integer.parseInt( iterateIdx.toString() ) % 2 == 0 ){ %>
													<tr bgcolor='#FFFFEE'>
													<%}else{%>
													<tr bgcolor='#DEE1E2'>
													<%}%>
														<td align="center"><font class="NArialL"><a href="<%=chipTracContext%>/purchaseOrderLotAction.do?poNumber=<bean:write name="lot" property="poNumber"/>&processStepId=<bean:write name="lot" property="processStep_id"/>"><bean:write name="lot" property="poNumber"/></a></font></td>
														<td align="center"><font class="NArialL"><bean:write name="lot" property="partNumber"/></font></td>
														<td align="center"><font class="NArialL"><bean:write name="lot" property="ps_type"/></font></td>
													</tr>
													</logic:iterate>
												</logic:present>
												<tr>

												</tr>
											</table>
										</td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
                    <input type="hidden" name="action" value="">
					</html:form>
					</td>
					<td bgcolor="#ffffff"><IMG height=1 src="<%=chipTracContext%>/jsp/includes/images/spacer.gif" width=1></td>
				</tr>
			</table>
		</td>
	</tr>
</table>
<!-- Footer starts here -->
<%@include file="/jsp/includes/footer.jsp" %>
<!-- footer end here -->
</BODY>
</HTML>
